﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Diamond : MonoBehaviour 
{
    private void Update()
    {
        if (GameManager.Instance.isGameOver)
        {
            StartCoroutine(BackSelf());
        }
    }


    IEnumerator BackSelf()
    {
        yield return new WaitForSeconds(2);
        ObjectPool.Instance.BackObj(gameObject);
    }
}
